N=1000000;
M=30;
a1 = 10;
b1 = 22;
x1 = rand(1, N);
X1 = x1*(b1 - a1) + a1;
hist(X1);

mat = 16;
sko = 2;
for n=1:N
    ss=sum(X1(:,n));
    Xnorm(n) = sko*2*(sqrt(3))*(ss - 0.5*M)+mat;
end
%hist(Xnorm);
aa=1;